package homework.day03;

import fileHomeWork.day03.User;

import java.io.*;

/**
 * 将Test01当前目录下的所有注册的User对象对应的obj文件获取到，并进行
 * 反序列化后输出每个用户的信息(直接输出反序列化后的User对象即可)
 *
 * @author Xiloer
 */
public class Test05 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("./user.obj");
        BufferedInputStream bis = new BufferedInputStream(fis);
        ObjectInputStream ois = new ObjectInputStream(bis);
        User u1 = (User) ois.readObject();
        System.out.println(u1);
    }
}
